package com.example.assignment01_javaee.Service.Impl;

import com.example.assignment01_javaee.Dao.UserDao;
import com.example.assignment01_javaee.Entity.User;
import com.example.assignment01_javaee.Service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserDao userDao;

    public User Sel(int id){
        return userDao.Sel(id);
    }

    public User login(String username, String password) {
        return userDao.login(username,password);
    }

    public void register(User user) {
        userDao.register(user);
    }
}
